﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Galaxian
{
    //This is the abstract class
    public abstract class GameObject : IRenderable, ICollidable
    {
        public bool IsDestroyed { get; set; }
        public Position Position { get; set; }
        public Objects Shape { get; set; }
        public bool isEnemy { get; set; }
        // properties only for enemy ships
        public bool IsShooting { get; set; }
        public int Millsec { get; set; }
        public DateTime Timer { get; set; }

        //Declaring several constructors just in case
        public GameObject(Position pos, Objects shape)
        {
            this.Position = pos;
            this.Shape = shape;
        }
        public GameObject(Position pos, Objects shape, bool isEnemy)
        {
            this.Position = pos;
            this.Shape = shape;
            this.isEnemy=isEnemy;
        }

        public GameObject(Position pos, Objects shape, bool isShooting, int millsec)
        {
            this.Position = pos;
            this.Shape = shape;
            this.IsShooting = isShooting;
            this.Millsec = millsec;
        }
        //gardax
        public virtual void Update()
        {
        }

        public virtual char[,] GetImage()
        {
            return new char[,] { { } };
        }
        public virtual Position GetPosition()
        {
            return this.Position;
        }

        public virtual bool CanCollideWith(Objects obj)
        {
            return true;
        }
    }
}
